/*IPROG - NEW - INI*/
package com.xcustom.commerce.order.databeans;

import java.util.ArrayList;
import java.util.List;

import javax.xml.ws.WebServiceException;

import com.efacil.commerce.order.helpers.ExtPedidosEfacilHelper;
import com.ibm.commerce.beans.SmartDataBeanImpl;
import com.xcustom.commerce.vo.NotaFiscalVO;

/**
 * This bean is used to perform the view 'RastrearPedidoDisplayView'
 * @author commerce
 *
 */
public class NotaFiscalDataBean extends SmartDataBeanImpl {
	List<NotaFiscalVO> listNatafiscal;
	String orderId;
	private Boolean serviceError;

	@Override
	public void populate() throws Exception {
		listNatafiscal = new ArrayList<NotaFiscalVO>();
		if (this.orderId != null) {
			try {
				ExtPedidosEfacilHelper helper = new ExtPedidosEfacilHelper();
				listNatafiscal = helper
						.consultarNotaFiscalPorPedido(this.orderId);
			} catch (WebServiceException e) {
				this.serviceError = true;

			}
		}
	}

	public List getListNatafiscal() {
		return listNatafiscal;
	}

	public void setListNatafiscal(List listNatafiscal) {
		this.listNatafiscal = listNatafiscal;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public Boolean getServiceError() {
		return serviceError;
	}

	public void setServiceError(Boolean serviceError) {
		this.serviceError = serviceError;
	}

}
/*IPROG - FIN - INI*/